import Mobel.Student;

import java.util.List;
import java.util.Scanner;

public class TestEmpDao {
    public static void main(String[] args) {
        EmpDaolmpl empDaolmpl = new EmpDaolmpl();
//        List<Student> students = empDaolmpl.selectAll();
//        System.out.println("students = " + students);
//        int delete = empDaolmpl.delete(14);
//        System.out.println("数据库删除了" + delete);
//        Scanner scanner = new Scanner(System.in);
//        Student student = new Student();
//        System.out.println("请输入学生的姓名");
//        String name = scanner.next();
//        System.out.println("请输入学生的性别");
//        String sex = scanner.next();
//        System.out.println("请输入学生的年龄");
//        Integer age = scanner.nextInt();
//        System.out.println("请输入学生的专业");
//        String major = scanner.next();
//        System.out.println("请输入学生的id");
//        Integer id = scanner.nextInt();
//        student.setName(name);
//        student.setSex(sex);
//        student.setAge(age);
//        student.setMajor(major);
//        student.setId(id);
//        int update = empDaolmpl.update(student);
//        System.out.println("update = " + update);
        Student select = empDaolmpl.select(17);
        System.out.println("select = " + select);
        Scanner scanner = new Scanner(System.in);
        Student student = new Student();
        System.out.println("请输入学生的姓名");
        String name = scanner.next();
        System.out.println("请输入学生的性别");
        String sex = scanner.next();
        System.out.println("请输入学生的年龄");
        Integer age = scanner.nextInt();
        System.out.println("请输入学生的专业");
        String major = scanner.next();
        System.out.println("请输入学生的专业");
        String time = scanner.next();
        student.setName(name);
        student.setSex(sex);
        student.setAge(age);
        student.setMajor(major);
        student.setTime(time);
      empDaolmpl.insert(student);
    }

}
